package com.potato.rxjavademo.observer_model;

import android.graphics.drawable.Drawable;
import android.widget.ImageView;
import android.widget.Toast;

import org.reactivestreams.Subscriber;

import io.reactivex.ObservableEmitter;
import io.reactivex.ObservableOnSubscribe;

public class Test {

    public static void main(String[] args) {
        test();
    }
    public static void test(){
        //创建一个微信服务
        Observable observable =new WeChatServerObservable();
        //创建多个观察者
        Observer user1 =new UserPerson("小胖1");
        Observer user2 =new UserPerson("小胖2");
        observable.addObserver(user1);
        observable.addObserver(user2);
        //推送消息
        observable.pushObservers("明天早上八点开始抢票！");
    }
}
